.mdc
file that enhances your development experience. The reown-appkit.mdc
file here contains Cursor-specific rules and type hints for Reown AppKit.
To use it in your project:
reown-appkit.mdc
file from this repository.cursor/rules
folder in your project’s root directory (if it doesn’t exist).mdc
file in your project’s .cursor/rules
folderprojectId
that will only work on localhost
.
To fully configure your project, please obtain a projectId
from the Reown Cloud Dashboard and update your project accordingly.
Refer to this section for more information.
createAppKit
function with a unified configuration. This automatically applies the predefined configurations for different adapters like Wagmi, Ethers, or Solana, so you no longer need to manually configure each one individually. Simply pass the common parameters such as projectId, chains, metadata, etc., and the function will handle the adapter-specific configurations under the hood.This includes WalletConnect, Coinbase and Injected connectors, and the Blockchain API as a transportconfig/index.tsx
outside our app directory and set up the following configuration@reown/appkit/networks
path.localStorage
instead if the storage
param is not defined.ssr
flag will delay the hydration of Wagmi’s store to avoid hydration mismatch errors.ssr
flag.
:::createAppKit
needs to be called inside a Next Client Component file).In this example we will create a file called context/index.tsx
outside our app directory and set up the following configurationapp/layout.tsx
file, we will import our ContextProvider
component and call the Wagmi’s function cookieToInitialState
.The initialState
returned by cookieToInitialState
, contains the optimistic values that will populate the Wagmi’s store both on the server and client.<appkit-button>
component.Web components are global html elements that don’t require importing.next.config.js
file